package com.example.mvvm.respository

import com.example.mvvm.api.Api
import com.example.mvvm.api.RetrofitManager
import kotlinx.coroutines.flow.flow

class MainRepository {
    val api:Api by lazy{
        RetrofitManager.getInstance().create(Api::class.java)
    }
    //数据---》flow流
    fun getVideoList(params:Map<String,String>)= flow {
        emit(api.getVideoData(params))
    }
}